package com.project.dong;


import com.project.dong.impl.*;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Demo {
    public static void main(String[] args) {
        DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
        reader.loadBeanDefinitions("classpath:applicationContext.xml");
        GeliDaoImpl geli = (GeliDaoImpl) beanFactory.getBean("geli");
        LuranDapImpl luren = (LuranDapImpl) beanFactory.getBean("luren");
        ShoujiangDaoImpl shoujiang = (ShoujiangDaoImpl) beanFactory.getBean("shoujiang");
        shoujiang.speak();
        geli.speak();
        luren.speak();
    }
}
